# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-screensaver
pkgver=5.0.16
pkgrel=1
pkgdesc='Deepin screensaver viewer and tools'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/deepin-screensaver"
license=('GPL3')
depends=('deepin-qt-dbus-factory' 'dtkcore' 'dtkwidget' 'qt5-base' 'qt5-declarative'
         'qt5-x11extras' 'libx11' 'libxcb' 'libxss' 'xscreensaver' 'gcc-libs')
makedepends=('qt5-tools' 'deepin-desktop-base')
groups=('deepin')
source=("https://github.com/linuxdeepin/deepin-screensaver/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('95c1a7f47e8dd5605f799478f382c237941ebd76925ec74915f155b541d6999b1187d1ad54d48cf1c2fe60c9e2c6a5bcb27c0adfb722ece9efe06fcaec4eac3c')

prepare() {
  cd deepin-screensaver-$pkgver
  sed -i 's|/etc/os-version|/etc/deepin-version|' common.pri
}

build() {
  cd deepin-screensaver-$pkgver
  qmake-qt5 PREFIX=/usr
  make
}

package() {
  cd deepin-screensaver-$pkgver
  make INSTALL_ROOT="$pkgdir" install
}
